<?php

namespace App\HttpController\Admin;

use App\Logic\Account\RechargeService;

/**
 * @ApiGroup(groupName="充值管理")

 */
class Recharge extends BaseController{
    /**列表*/
    public function index()
    {
        $service = new RechargeService();
        $result = $service->getLists($this->request());
        return $this->writeJsonByOutput($result);
    }

    /**充值*/
    public function create()
    {
        $service = new RechargeService();
        $data = $this->getJson();
        $result = $service->create($data);
        return $this->writeJsonByOutput($result);
    }

    /**确认会员充值到账*/
    public function confirm()
    {
        $service = new RechargeService();
        $data = $this->getJson();
        $result = $service->confirm($data);
        return $this->writeJsonByOutput($result);
    }

    /**取消会员充值*/
    public function cancel()
    {
        $service = new RechargeService();
        $data = $this->getJson();
        $result = $service->cancel($data);
        return $this->writeJsonByOutput($result);
    }

    /**字典*/
    public function dict(){
        $service = new RechargeService();
        $result = $service->getDict($this->request());
        return $this->writeJsonByOutput($result);
    }


}
